<?php
     @session_start();
    include("template/head.php");
  //  include("template/menu_left.php");   
    include("submit/Articles/test_qte.php");
?>

    <div class="container-fluid">
        <div class="row-fluid">
                
        <?php include("template/menu_left.php") ?>                
        
        <div class="span10" id="content">
            <div class="row-fluid">
              <form id="formAddIntervention" class="form-horizontal"  enctype="multipart/form-data" method="POST" action="submit/Articles/add_article.php">

            <!-- block -->
                <!--  ************************ ROW ************************  -->
              <div class="span6">   
                 <div class="block">
                    <div class="navbar navbar-inner block-header">
                        <div class="muted pull-left">Détail Article</div>
                        <!-- .toolbar -->
                    </div>   
                    <div class="block-content in" id="div-1">
                    <div class="control-group">  
                        <label class="control-label span4" for="ref_article">Référence </label>
                          <div class="controls">
                            <input type="text" name="ref_article" class="validate[required] form-control " placeholder="Référence article" id="form-validation-field-1">
                          </div>
                    </div>
                    <div class="control-group">  
                    <div>
                      <textarea id="comment" name="designation" placeholder="Désignation..." style="width:388px;height:100px;"></textarea>
                    </div>
                  </div>
                   
                    <div class="control-group">
                        <label class="control-label span4" for="select01">Type</label>
                          <div class="controls">
                            <select id="select01" class="" name="id_type">
                              <option>Selectionnez</option>
                                <?php
                                    $table = "SELECT DISTINCT (`nom_type`), `id_type` FROM st_att_type_article ORDER BY nom_type ASC;";     
                                    $colonne = mysql_query($table);     
                                    while($data = mysql_fetch_array($colonne)){
                                    echo '<option value="'.$data["id_type"].'">'.$data["nom_type"].'</option>';
                                     }

                                  ?>
                            </select>
                          </div>
                      </div> 
                        <div class="control-group">
                            <label class="control-label span4" for="pass1">Emplacement</label>
                            <div class="controls">
                                <select id="id_emplacement" class="form-control" name="id_emplacement" onchange='charger_modele()'>
                                    <option value="">Selectionner</option>
                                      <?php
                                      $table = "SELECT DISTINCT (`nom_lieu`), `id_lieu` FROM st_att_lieu_article ORDER BY nom_lieu ASC;";     
                                      $colonne = mysql_query($table);     
                                      while($data = mysql_fetch_array($colonne)){
                                          echo '<option value="'.$data["id_lieu"].'">'.$data["nom_lieu"].'</option>';
                                      }

                                      ?>
                                  </select>  
                            </div>
                        </div> 
                        <div class="control-group">
                            <label class="control-label span4" for="pass1">Prix de vente</label>
                            <div class="controls">
                              <input type="text" name="prix" class="form-control" placeholder="Prix de vente" id="form-validation-field-3">
                           </div>
                        </div> 
                        <div class="control-group">
                            <div>
                          	<textarea id="comment" name="comment" placeholder="Obsérvation..." style="width:388px;height:100px;"></textarea>
                            </div>
                        </div>  
                             <!-- /.control-group -->
                    </div>
                    </div>
              </div>
            <!--  ************************ / ROW ************************  -->
            <!-- block -->
                <!--  ************************ ROW ************************  -->
              <div class="span6">   
                 <div class="block">
                    <div class="navbar navbar-inner block-header">
                        <div class="muted pull-left">Photo</div>
                        <!-- .toolbar -->
                    </div>   
                    <div class="block-content collapse in" id="div-1">
                      <div class="form-control">
                        <label class="control-label span4"> Photo</label>
                        <div class="span8">
      	                  <div class="fileupload fileupload-new" data-provides="fileupload">
        	                  <div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;"></div>
                          <div>
                          	<span class="btn btn-file btn-success"><span class="fileupload-new">Charger une photo</span><span class="fileupload-exists">Changer</span><input type="hidden" name="MAX_FILE_SIZE" value="2097152"><input type="file" name="photo_article" id="photo_article" /></span>
                          	<a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload">Supprimer</a>
                          </div>
                   
                        </div>
                      </div>
                    </div> 
                  </div>
                </div>     
              <!--  ************************ / ROW ************************  -->   
              <!--  ************************ ROW ************************  -->
             
                 <div class="block">
                    <div class="navbar navbar-inner block-header">
                        <div class="muted pull-left">Quantité</div>
                        <!-- .toolbar -->
                    </div>
                    <div class="block-content collapse in" id="div-1">
                      <div class="control-group">
                            <label class="control-label span3" for="pass1" >Quantité Minimale</label>
                            <div class="controls">
                              <input type="text" name="qte_min" class="form-control" placeholder="Qte Min" id="form-validation-field-3">
                           </div>
                        </div> 
                        <div class="control-group">
                            <label for="comment" class="control-label span3" >Unité de stockage</label>
                            <div class="controls">
                             <select class="form-control" id="id_unit" name="id_unit">
                                <option value="">Selectionner</option>
                                 <?php
                                      $table = "SELECT DISTINCT (`valeur`), `id_unite_stockage` FROM st_att_unite_stockage ORDER BY nb_pieces ASC;";     
                                      $colonne = mysql_query($table);     
                                      while($data = mysql_fetch_array($colonne)){
                                          echo '<option value="'.$data["id_unite_stockage"].'">'.$data["valeur"].'</option>';
                                      }

                                  ?>
                              </select>
                            </div>
                        </div>

                  </div>
              </div>
              <div class="form-group">
                <div class="col-lg-8">
                    <input type="submit" value="Ajouter" class="validate[required] span3 btn btn-primary" style="margin-bottom:1em; float: right;" name="marque_ajout">
               </div>
          </div>         
             </form>   
          
          
          </div>
            <hr>
        </div>
<?php  include("template/footer_form.php") ; ?>